<?php
require "../../system/framework.php";

$nTable=$_REQUEST['n_table'];
$nTableId=db::getValue("SELECT id FROM _table WHERE table_name='{$nTable}'");
$mTable=$_REQUEST['m_table'];

$nmTable=$nTable . "_" . $mTable;

$data=array();
$data['n_table']=$nTableId;
$data['m_table']=$mTable;

db::saveData("_nm_table", $data);

$dbTable=new table();
$dbTable->tableName=$nmTable;
$dbTable->nmTable=1;
$dbTable->nTable=$nTable;
$dbTable->mTable=$mTable;

// scaffolding!!!!


$table=$dbTable->createTable();


//$id = db::getValue("SELECT id FROM _table WHERE `table_name`='$ntable'");
$redirect="[php_property:action]";

//[form:id] ersetzen
$redirect=str_ireplace("[form:id]", $nTableId, $redirect);
http::redirect($redirect);
?>